package com.huawei.appmarket.service.externalapi.actions;

import android.view.KeyEvent;
import o.dyr;
import o.dys.a;

public class PayZoneAction extends dyr {
    public PayZoneAction(a aVar) {
        super(aVar);
    }

    public void onAction() {
        this.callback.setResult(2);
        this.callback.finish();
    }

    public void cancelTask() {
        this.callback.setResult(1);
        this.callback.finish();
    }

    public int onKeyDown(int i, KeyEvent keyEvent) {
        if (i == 4 && keyEvent.getRepeatCount() == 0) {
            this.callback.setResult(1);
        }
        return super.onKeyDown(i, keyEvent);
    }
}
